import router from '../router'
import getToken from '../untils/getToken.js'
router.beforeEach((to, from, next) => {
  console.log(to)
  if (to.fullPath !== '/login') {
    if (getToken('loginToken')) {
      return next()
    } else {
      router.push('/login')
      return next()
    }
  } else {
    console.log(123)
    return next()
  }
})
